package com.luwanglin.eduservice;

import com.luwanglin.eduservice.entity.EduSubject;
import com.luwanglin.eduservice.service.EduSubjectService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.web.WebAppConfiguration;

@SpringBootTest
@WebAppConfiguration
public class testInsert {
    @Autowired
    EduSubjectService eduSubjectService;

    @Test
    void test1() {
        EduSubject eduSubject = new EduSubject();
        eduSubject.setTitle("test");
        eduSubject.setParentId("0");
        eduSubjectService.save(eduSubject);
        System.out.println(eduSubject.getId());
    }
}
